package Ants.Modules.Fight.SpecialCases;

import Ants.Debug.VLog;
import Ants.Model.Alert;
import Ants.Model.Ant;
import Ants.Model.Status;
import Ants.Model.Type;
import Ants.Utils.AStar;

public class SpecialCases {

	private static String VLogColor = "255 0 0 0.5";
	
	private Status status;

	public SpecialCases(Status status){
		this.status = status;
	}
	
	public void rushEnemyHill(Alert alert){
		for (Ant ant: alert.getMyAnts()) {
			Ants.Model.Tile ememyHill = alert.getEnemyHills().get(0);
			Ants.Model.Tile nextMove = AStar.Search(ant.getTile(), ememyHill);
			if(nextMove != null && nextMove.getType() != Type.MY_ANT){
				VLog.PrintWay(ant.getTile(), ememyHill, VLogColor);
				ant.moveTo(nextMove, status);
			}
		}
	}
	
}
